package com.xcode.unit.sourcecode;

import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.squareup.javapoet.*;
import com.xcode.unit.constant.UnitTestClassConstants;
import com.xcode.unit.model.MethodModel;
import com.xcode.unit.model.UnitTestModel;
import com.xcode.unit.util.LReflectionUtils;
import com.xcode.unit.util.LStringUtils;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;

import javax.lang.model.element.Modifier;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.file.FileSystems;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;

/**
 * @author liuziying
 * @Description 此处添加功能描述
 * @Date 2020/12/24
 */
public class CreateJavaSource {

    public static void main(String[] args) throws ClassNotFoundException {
        //限定包名
        String sourcePackageName = "com.xcode.biz.service.impl";
        //类名
        String sourceClassName = "UserServiceImpl";

        UnitTestBuilder.builder().addSourcePackageNameModel(sourcePackageName)
                .addSourceClassNameModel(sourceClassName)
                .addSourceClazzModel()
                .addClassNameModel()
                .addClassInfoModel()
                .addMethodModel()
                .buildUnitTestClass()
                .create();
    }
}
